package com.szzg10.jsp.chapter10;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class ClassicTagTest2 extends TagSupport {

	JspWriter jspWriter;
	
	@Override
	public int doStartTag() throws JspException {
		jspWriter = pageContext.getOut();
		
		try {
			jspWriter.println("in doStartTag()");
		}
		catch(IOException e) {
			throw new JspException("IOException- " + e.toString());
		}
		
		return SKIP_BODY;
	}
	
	@Override
	public int doEndTag() throws JspException {
		try {
			jspWriter.println("in doEndTag()");
		}
		catch(IOException e) {
			throw new JspException("IOException- " + e.toString());
		}
		
		return EVAL_PAGE;
		
	}
}
